
txt_path = "/Users/pengcheng/ws/my_tvbox/js/txt.txt"
with open(txt_path, "r") as f:
    lines = f.readlines()
    for line in lines:
        line = line.strip()
        if line[-5:]==".m3u8":
            link = line
        else:
            line_spit=line.split(",")
            name = line_spit[-1]
            link= None
        if link is not None:
            print(f"{name},{link}")
            
            